<?php
/**
 * Index controller tests.
 *
 * @category Tests
 * @package  PhpCilux
 */

require_once 'Zend/Application.php';
require_once 'Zend/Test/PHPUnit/ControllerTestCase.php';

/**
 * Abstract class for controller tests.
 *
 * @package PhpCilux
 */
abstract class ControllerTestCase extends Zend_Test_PHPUnit_ControllerTestCase
{

    /**
     * Application for tests.
     *
     * @var Zend_Application
     */
    public $application;

    /**
     * Application setup.
     *
     * @return void
     */
    public function setUp()
    {
        $this->application = new Zend_Application(
            APPLICATION_ENV,
            APPLICATION_PATH . '/configs/application.ini'
        );

        $this->bootstrap = array($this, 'appBootstrap');
        parent::setUp();
    }

    /**
     * Application bootstrap.
     *
     * @return void
     */
    public function appBootstrap()
    {
        $this->application->bootstrap();
    }

}

